<template>

  <!--

    ja-cookie
       操作cookie
         get 获取
         set 设置
         remove 删除

    -->

  <div>
    <h3 @click="a">{{ num }}</h3>

  </div>
</template>

<script>
import js_cookie from 'js-cookie'
export default {
  data() {
    return {
      num: js_cookie.get('num') || 0
    }
  },
  methods: {
    a() {
      this.num++
      js_cookie.set('num', this.num)
    }
  }
}
</script>

<style>

</style>
